Telegram Group & Telegram Channel
Forwarded from Raspberry Project
اولین پروژه با میکروپایتون را شروع کنید!!!!


برد میکروپایتون را راه اندازی کنید و وارد صفحه ترمینال IDLE Python شوید .

ابتدا کتابخانه Machine را فراخوانی کنید

>>import machine

و سپس یکی از پینهای برد را به حالت خروجی تنظیم میکنیم

>>led = machine.Pin(Pin Number, machine.Pin.OUT)

در دستور بالا به جای
Pin Number

شماره پین مورد نظر را وارد کنید

..با دستور زیر میتوانید led متصل به پین مورد نظر را روشن کنید . یا به عبارتی پین مورد نظر را 1 کنید .

>>led.high()

و با دستور زیر میتوانید Pin را به حالت ۰منطقی و یا خاموش ببرید

>>led.low()

تا اینجا به صورتی دستی توانستیم یک پین را ۰ و ۱ کنیم . حال میخواهیم چروژه چشمک زن را به صورت اتوماتیک اجرا کنیم .

کتابخانه Time را جهت ایجاد تاخیر فراخوانی میکنیم

>>import time

و به کمک یک حلقه بینهایت میتوانید این عملیات چشمک زدن را اجرا نمایید

>> while True:
led.high()
time.sleep(0.5)
led.low()
time.sleep(0.5)


پایان اولین پروژه با میکرو پایتون

اسکریپت به صورت کامل 👇👇👇

#BLINK MICRO PYTHON
#--------------------------
import machine
import time
led = machine.Pin(15,machine.Pin.OUT)
while True:
led.high()
time.sleep(0.5)
led.low()
time.sleep(0.5)
#--------------------------
# On behalf of Eng Meysam Mz
#---------------------------


@Raspberryproject
@Raspberry_Python
@micropython_iot



tg-me.com/micropython_iot/33
Create:
Last Update:

اولین پروژه با میکروپایتون را شروع کنید!!!!


برد میکروپایتون را راه اندازی کنید و وارد صفحه ترمینال IDLE Python شوید .

ابتدا کتابخانه Machine را فراخوانی کنید

>>import machine

و سپس یکی از پینهای برد را به حالت خروجی تنظیم میکنیم

>>led = machine.Pin(Pin Number, machine.Pin.OUT)

در دستور بالا به جای
Pin Number

شماره پین مورد نظر را وارد کنید

..با دستور زیر میتوانید led متصل به پین مورد نظر را روشن کنید . یا به عبارتی پین مورد نظر را 1 کنید .

>>led.high()

و با دستور زیر میتوانید Pin را به حالت ۰منطقی و یا خاموش ببرید

>>led.low()

تا اینجا به صورتی دستی توانستیم یک پین را ۰ و ۱ کنیم . حال میخواهیم چروژه چشمک زن را به صورت اتوماتیک اجرا کنیم .

کتابخانه Time را جهت ایجاد تاخیر فراخوانی میکنیم

>>import time

و به کمک یک حلقه بینهایت میتوانید این عملیات چشمک زدن را اجرا نمایید

>> while True:
led.high()
time.sleep(0.5)
led.low()
time.sleep(0.5)


پایان اولین پروژه با میکرو پایتون

اسکریپت به صورت کامل 👇👇👇

#BLINK MICRO PYTHON
#--------------------------
import machine
import time
led = machine.Pin(15,machine.Pin.OUT)
while True:
led.high()
time.sleep(0.5)
led.low()
time.sleep(0.5)
#--------------------------
# On behalf of Eng Meysam Mz
#---------------------------


@Raspberryproject
@Raspberry_Python
@micropython_iot

BY Micropython & IOT


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/micropython_iot/33

View MORE
Open in Telegram


Micropython & IOT Telegram | DID YOU KNOW?

Date: |

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

The global forecast for the Asian markets is murky following recent volatility, with crude oil prices providing support in what has been an otherwise tough month. The European markets were down and the U.S. bourses were mixed and flat and the Asian markets figure to split the difference.The TSE finished modestly lower on Friday following losses from the financial shares and property stocks.For the day, the index sank 15.09 points or 0.49 percent to finish at 3,061.35 after trading between 3,057.84 and 3,089.78. Volume was 1.39 billion shares worth 1.30 billion Singapore dollars. There were 285 decliners and 184 gainers.

Micropython & IOT from tw


Telegram Micropython & IOT
FROM USA